import javax.swing.*;
import java.awt.event.*;
import java.awt.*;

public class Launcher extends JFrame implements ActionListener
{
  
  
  JButton launch = new JButton("Launch");
  
  public void actionPerformed(ActionEvent e)
  {
    if (e.getSource().equals(launch))
    {
      new GameWindow();
      this.dispose();
    }
  }
  
  public Launcher()
  {
    super ("SpaceWars launcher");
    setLayout(new FlowLayout());
    getContentPane().add(new JLabel("This program launches the spacewars game."));
    getContentPane().add(new JLabel("Data for the ship is stored in playerShip.txt"));
    getContentPane().add(launch);
    setVisible(true);
    setSize(600,400);
   // setResizable(false);
    setDefaultCloseOperation(EXIT_ON_CLOSE);
    launch.addActionListener(this);
    
  }
  public static void main(String[] args)
  {
    new Launcher();
  }
  
}